import { createApp } from 'vue'
import router from './router'
import Axios from 'axios'
import { ref } from "vue";
import BaseUrl from '../test';
import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css';
import * as ElementPlusIcons from '@element-plus/icons-vue'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import App from './App.vue'

router.beforeEach((to, from, next) => {
  document.title = to.meta.title || '贡聘招聘系统企业管理端'
  next()
})

const AppNew = createApp(App);
AppNew.use(router)
AppNew.use(ElementPlus, { locale: zhCn })
AppNew.config.globalProperties.$Axios = Axios;
for (const [key, component] of Object.entries(ElementPlusIcons)) {
  AppNew.component(key, component)
}
AppNew.mount('#app')